#!/usr/bin/env sh

mkdir -p ~/.config/guix/

echo "(list (channel" > ~/.config/guix/channels.scm
echo "       (inherit (car %default-channels))" >> ~/.config/guix/channels.scm
echo '       (url "https://mirror.sjtu.edu.cn/git/guix.git")))' >> ~/.config/guix/channels.scm

echo ";(list channel" > ~/.config/guix/channels.scm
echo ";	(name 'guix)" >> ~/.config/guix/channels.scm
echo ';	(url "https://mirror.sjtu.edu.cn/git/guix.git")))")' >> ~/.config/guix/channels.scm
echo ";  (branch "master")))" >> ~/.config/guix/channels.scm

echo "" >> ~/.config/guix/channels.scm

echo "(use-modules (guix ci))" >> ~/.config/guix/channels.scm
echo "(list (channel-with-substitutes-available" >> ~/.config/guix/channels.scm
echo "	%default-guix-channel" >> ~/.config/guix/channels.scm
echo '	"https://mirror.sjtu.edu.cn/guix"))' >> ~/.config/guix/channels.scm

echo "" >> ~/.config/guix/channels.scm

echo "(cons* (channel" >> ~/.config/guix/channels.scm
echo "        (name 'nonguix)" >> ~/.config/guix/channels.scm
echo '        (url "https://gitlab.com/nonguix/nonguix")' >> ~/.config/guix/channels.scm
echo "        ;; Enable signature verification:" >> ~/.config/guix/channels.scm
echo "        (introduction" >> ~/.config/guix/channels.scm
echo "         (make-channel-introduction" >> ~/.config/guix/channels.scm
echo '          "897c1a470da759236cc11798f4e0a5f7d4d59fbc"' >> ~/.config/guix/channels.scm
echo "          (openpgp-fingerprint" >> ~/.config/guix/channels.scm
echo '           "2A39 3FFF 68F4 EF7A 3D29  12AF 6F51 20A0 22FB B2D5"))))' >> ~/.config/guix/channels.scm
echo "       %default-channels)" >> ~/.config/guix/channels.scm

